PermissionCompatDelegate

Customizable delegate that allows delegating permission compatibility methods to a custom implementation.

To delegate permission compatibility methods to a custom class, implement this interface, and call ActivityCompat.setPermissionCompatDelegate(delegate);. All future calls to the permission compatibility methods in this class will first check whether the delegate can handle the method call, and invoke the corresponding method if it can.

Functions

Link copied to clipboard
abstract fun onActivityResult(@NonNull activity: Activity, @IntRange(from = 0) requestCode: Int, resultCode: Int, @Nullable data: Intent): Boolean
Determines whether the delegate should handle the permission request as part of FragmentActivity#onActivityResult(int, int, Intent).
Link copied to clipboard
abstract fun requestPermissions(@NonNull activity: Activity, @NonNull permissions: Array<String>, @IntRange(from = 0) requestCode: Int): Boolean
Determines whether the delegate should handle requestPermissions, and request permissions if applicable.